/*******************************************************************************
* Copyright (c) 2010, 2018 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.entity;

import com.qinyeit.serviceapp.entity.enums.PriceupType;
import lombok.Builder;
import lombok.experimental.Tolerate;

import javax.persistence.*;

/**
 * ClassName: DishesMakeRelation <br/>
 * Function: 菜品做法关系 <br/>
 * date: 2018-11-23 13:44:11 <br/>
 *
 * @author liuwenjin
 * @version  1.0
 * @since JDK 1.8
 */
@Builder
@Entity
@Table(name="dishes_make_relations")
public class DishesMakeRelation extends MerchantGroupBaseEntity<Long> {

	private static final long serialVersionUID = 1L;

	// 菜品库 
    @Column(name="store_id")
	private Long storeId = null;

	// 菜品 
    @Column(name="dishes_id")
	private Long dishesId = null;

	// 做法类别id 
    @Column(name="make_category_id")
	private Long makeCategoryId = null;

	// 做法类别名称 
    @Column(name="make_category_name", length = 300)
	private String makeCategoryName = null;

	// 做法 
    @Column(name="make_id")
	private Long makeId = null;

	// 做法名称 
    @Column(name="name", length = 300)
	private String name = null;

	// 加价类型
	@Column(name="priceup_type", length = 300)
	@Enumerated(EnumType.STRING)
	private PriceupType priceupType = PriceupType.PROPROTIONADD;

	// 加价值 
    @Column(name="val",scale=2)
	private Double val = null;


	// 是否默认
	@Column(name="def")
	private Boolean def = null;

	//创建的时候生成 编辑的时候不变
	@Column(name="uuid", length = 300)
	private String uuid = "";

	//更新的时间戳 long
	@Column(name="update_timestamp")
	private Long updateTimestamp = null;


	@Tolerate
	public DishesMakeRelation() {
		
	}
    @Tolerate
	public DishesMakeRelation(Long id){
    	super.setId(id);
    }
	
	/**
	 * 获取菜品库
	 */
	public Long getStoreId() {
		return this.storeId;
	}

    /**
     * 设置菜品库
     */
	public DishesMakeRelation setStoreId(Long storeId) {
		this.storeId = storeId;
		return this;
	}

	/**
	 * 获取菜品
	 */
	public Long getDishesId() {
		return this.dishesId;
	}

    /**
     * 设置菜品
     */
	public DishesMakeRelation setDishesId(Long dishesId) {
		this.dishesId = dishesId;
		return this;
	}

	/**
	 * 获取做法类别id
	 */
	public Long getMakeCategoryId() {
		return this.makeCategoryId;
	}

    /**
     * 设置做法类别id
     */
	public DishesMakeRelation setMakeCategoryId(Long makeCategoryId) {
			this.makeCategoryId = makeCategoryId;
		return this;
	}

	/**
	 * 获取做法类别名称
	 */
	public String getMakeCategoryName() {
		return this.makeCategoryName;
	}

    /**
     * 设置做法类别名称
     */
	public DishesMakeRelation setMakeCategoryName(String makeCategoryName) {
		this.makeCategoryName = makeCategoryName;
		return this;
	}

	/**
	 * 获取做法
	 */
	public Long getMakeId() {
		return this.makeId;
	}

    /**
     * 设置做法
     */
	public DishesMakeRelation setMakeId(Long makeId) {
		this.makeId = makeId;
		return this;
	}

	/**
	 * 获取做法名称
	 */
	public String getName() {
		return this.name;
	}

    /**
     * 设置做法名称
     */
	public DishesMakeRelation setName(String name) {
		this.name = name;
		return this;
	}

	public PriceupType getPriceupType() {
		return priceupType;
	}

	public void setPriceupType(PriceupType priceupType) {
		this.priceupType = priceupType;
	}

	/**
	 * 获取加价值
	 */
	public Double getVal() {
		return this.val;
	}

    /**
     * 设置加价值
     */
	public DishesMakeRelation setVal(Double val) {
		this.val = val;
		return this;
	}

	public Boolean getDef() {
		return def;
	}

	public void setDef(Boolean def) {
		this.def = def;
	}
}
